﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Xml;
using System.Xml.Schema;
using System.IO;
using DataTransferObject;

namespace DataService.TestingService
{
    class OutputToXML
    {
        //To be read
        // What is the input of this method? List of Events?

        public void writeEventsToFile(String XMLPath)
        {
            //XmlTextWriter XmlWriter = new XmlTextWriter(XMLPath, System.Text.Encoding.UTF8);
            XmlTextWriter XmlWriter = new XmlTextWriter(@"D:\Jske\HOAN\JskeOutput.xml", System.Text.Encoding.UTF8);

            XmlWriter.WriteStartDocument();            
            XmlWriter.WriteStartElement("BOOKs");
            XmlWriter.WriteStartElement("Book");
            XmlWriter.WriteElementString("TITLE", "this is the title.");
            XmlWriter.WriteElementString("AUTHOR", "I am the author.");
            XmlWriter.WriteElementString("PUBLISHER", "who is the publisher");
            XmlWriter.WriteEndElement();
            XmlWriter.WriteEndElement();
            XmlWriter.WriteEndDocument();
        }
    }
}
